import requset from "@/utils/request";

enum URL {
  commonMenuTree = '/v1/admin/options/menu',
  commonDeptTree = '/v1/admin/options/dept',
  commonRole = '/v1/admin/options/role',
  commonUsers = '/v1/admin/options/users'
}

const optionsMenu = async () => requset<APICOMMON.CommonMenuItem[]>({ url: URL.commonMenuTree, method:"GET" })
const optionsDept = async () => requset<APICOMMON.DeptList[]>({ url: URL.commonDeptTree, method:"GET" })
const optionsRole = async () => requset<APICOMMON.RoleList[]>({ url: URL.commonRole, method:"GET" })
const optionsUser = async () => requset<APICOMMON.UserList[]>({ url: URL.commonUsers, method:"GET" })

export default { optionsMenu,optionsDept,optionsRole,optionsUser};
